<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Powered by 9416.cn</title>


<!--#include file="../inc/conn.asp"-->


<script type="text/javascript" src="../ui/jquery.js"></script>
 <link rel="stylesheet" href="../ui/layui/css/layui.css" type="text/css"  />

<script type="text/javascript" src="../ui/layui/layui.js"></script>


</head>


<body>

<div class="mec_div" style="padding-top:0px; padding-bottom:20px;padding-left:20px;padding-right:20px;">
<div class="layui-tab layui-tab-brief">
<ul class="layui-tab-title site-demo-title">
   <li class="layui-this">会员中心</li>
  <li >积分详情</li>
<li >积分说明</li>
</ul>

<div class="layui-tab-content">
 <div class="layui-tab-item layui-show">
 
 <%sql="select * from [user] where id="&request.Cookies("user")("id")
  rs.open sql,conn,3,3%>
     
<table width="100%" class="layui-table"  >
    <tr>
      <td width="110">会员名：</td>
      <td><%=rs("email")%></td>
    </tr>
    <tr>
      <td width="80">我的积分：</td>
      <td><%set rst=conn.execute("select sum(point)as tpoint from user_point where uid="&request.Cookies("user")("id"))
	  if isnull(rst("tpoint")) then
	  response.Write "0"
	  else
	  response.Write rst("tpoint")
	  end if
	  
	  rst.close
	  
	  %> 
      
         <%
	   sql="select * from [user_point] where item='qd' and uid="&request.Cookies("user")("id")&" and datediff('d',intime,now())=0"

rst.open sql,conn,3,3
if  rst.eof and rst.bof then%>
 <a class="layui-btn" onclick="qd()" ><i class="layui-icon layui-icon-log"></i>我要签到</a>
 <%else%>
  <a class="layui-btn layui-btn-disabled" ><i class="layui-icon layui-icon-log"></i>今日已签到</a>
 <%end if
 rst.close%>
      
       </td>
      
       
    </tr>
    <tr>
      <td width="100">昵称：</td>
      <td><%=rs("username")%></td>
    </tr>
  
    <tr>
      <td>注册时间：</td>
    <td><%=rs("intime")%></td>
    </tr>
    <tr>
      <td>上次登陆时间：</td>
    <td><%=rs("lasttime")%></td>
    </tr>
     <tr>
      <td>登陆IP：</td>
    <td><%=rs("addr")%></td>
    </tr>
     <tr>
      <td>登陆次数：</td>
     <td><%=rs("num")%></td>
    </tr>
    
       
       </table>
       <%rs.close%>
 
 
      
     </div>
    
      <div class="layui-tab-item" >
<table class="layui-hide" id="table" lay-filter="demo"></table>
  </div>  
    
    <div class="layui-tab-item">
  
 <%jianbook.uqxmsg()
 on error resume next
%>
    
 <%

 
sql="select * from [user_set] "
  rs.open sql,conn,3,3
  if not rs.eof then
  user_zt=rs("audit")
  user_point=split(rs("point"),",")
  end  if
  rs.close
  
  %>
     
  	   <table width="100%"  class="layui-table"  >
    
    <tr>
      <td width="110" height="40">注册获得积分：</td>
      <td>
      <%=trim(user_point(0))%>积分</td>
      <td width="110">每日登陆积分：</td>
      <td><%=trim(user_point(1))%>积分</td>
    </tr>
    
     <tr>
      <td width="110" height="40">每日发帖积分：</td>
      <td>
      <%=trim(user_point(2))%>积分</td>
      <td>每日回复积分：</td>
      <td> <%=trim(user_point(3))%>积分</td>
    </tr>
        <tr>
      <td width="110" height="40">每日签到积分：</td>
      <td>
     <%=trim(user_point(4))%>积分</td>
      <td>连续签到5天：</td>
      <td> <%=trim(user_point(5))%>积分</td>
    </tr>
             <tr>
      <td width="110" height="40">连续签到10天：</td>
      <td>
 <%=trim(user_point(6))%>积分</td>
      <td>连续签到30天：</td>
      <td> <%=trim(user_point(7))%>积分</td>
    </tr>
             <tr>
               <td height="40" colspan="4"><span class="mec_div" style="padding-top:0px; padding-bottom:20px;padding-left:20px;padding-right:20px;"> Ps:删除帖子会删掉相应的积分！ </span></td>
             </tr>
       
       </table>
       
</div>
    

</div> 
   </div>
   </div>

<script>
layui.use('table', function(){
  var table = layui.table;

  //方法级渲染
  table.render({
    elem: '#table'
    ,url: '../inc/user.asp?act=point'
	
    ,title: '积分获取列表'
	,cellMinWidth: 100 
	
    ,cols: [[
	
	{field:'point', title: '积分',   sort: true}
	 ,{field:'bz', title: '说明',  sort: true}
	 ,{field:'intime', title: '时间',  sort: true}
	
     
	   
    ]]
    ,id: 'testReload'
    ,page: true
  ,limit:20
  });

  

  
  
  
  
  
  
  

});
</script>
<script type="text/javascript" src="../ui/pc.js"></script>			
<%

if request("act")="qd" then

sql="select * from [user_point] where item='qd' and uid="&request.Cookies("user")("id")&" and datediff('d',intime,now())=1"
rs.open sql,conn,3,3
if not rs.eof then
qdnum=rs("num")+1

if rs("num")>=4 then

qdjf=jianbook.point(5)

elseif rs("num")>=9 then
qdjf=jianbook.point(6)
elseif rs("num")>=29 then
qdjf=jianbook.point(7)
else

qdjf=jianbook.point(4)
end if

else
qdnum=1
qdjf=jianbook.point(4)
end if

rs.close
sql="select * from [user_point] where item='qd' and uid="&request.Cookies("user")("id")&" and datediff('d',intime,now())=0"

rs.open sql,conn,3,3
if  rs.eof and rs.bof then
conn.execute "insert into user_point(item,uid,point,num,bz) values ('qd',"&request.Cookies("user")("id")&","&qdjf&","&qdnum&",'签到获得积分')"
end if
rs.close
response.Redirect("info.asp")
end if
	

 
 
%>

</body>

</html>
